﻿within can1;
block can_send_msg_user

  annotation (
    __MWorks(BlockSystem, independentInstance = true), 
    Icon(coordinateSystem(extent = {{-200.0, -100.0}, {200.0, 100.0}}, 
      preserveAspectRatio = false, 
      initialScale = 0.1, 
      grid = {2.0, 2.0}), graphics = {Rectangle(origin = {0.0, 0.0}, 
      fillColor = {255, 255, 255}, 
      fillPattern = FillPattern.Solid, 
      extent = {{-200.0, 100.0}, {200.0, -100.0}}), Text(origin = {0.0, 0.0}, 
      extent = {{-100.0, 20.0}, {100, -20}}, 
      textString = "Can_Send_Msg_user", 
      verticalAlignment = TextAlignment.VCenter), Text(origin = {0.0, -120.0}, 
      lineColor = {0, 0, 0}, 
      extent = {{-150, 20}, {150, -20}}, 
      textString = "%name", 
      fontSize = 14, 
      textStyle = {TextStyle.None}, 
      textColor = {0, 0, 0}, 
      verticalAlignment = TextAlignment.Top)}), 
    Diagram(coordinateSystem(extent = {{-100.0, -100.0}, {100.0, 100.0}}, 
      preserveAspectRatio = false, 
      initialScale = 0.1, 
      grid = {2.0, 2.0})));
  function func_CCaller1
    output Integer out;
    input Integer msg;
    input Integer send_flag;
  external "C" out = Can_Send_Msg_user(msg, send_flag)
  annotation (Include = "#include\"can_user.c\"", 
    IncludeDirectory = "D:/Data/Work Code/CAN - SY/HARDWARE/CAN");
  end func_CCaller1;
  SysplorerEmbeddedCoder.Port.IntegerInput msg
    annotation (Placement(transformation(extent = {{-220, 44}, {-200, 24}})));
  SysplorerEmbeddedCoder.Port.IntegerInput send_flag
    annotation (Placement(transformation(extent = {{-220, -22}, {-200, -42}})));
  SysplorerEmbeddedCoder.Port.IntegerOutput out
    annotation (Placement(transformation(extent = {{200, -10}, {220, 10}})));
equation 
  out = func_CCaller1(msg, send_flag);
end can_send_msg_user;